package org.rainbowinverted.charging.device.api.operation.dto.resp;

import lombok.*;

import java.io.Serial;
import java.io.Serializable;

/**
 * 事件信息
 *
 * @author huaiping
 */
@Data
@NoArgsConstructor(access = AccessLevel.PRIVATE)
@AllArgsConstructor(staticName = "of")
public class EventInfo implements Serializable {
    @Serial
    private static final long serialVersionUID = -8392171622813978352L;
    /**
     * 插入
     */
    private Boolean gunInserted;
    /**
     * 拔枪
     */
    private Boolean gunPullOfOut;
    /**
     * 过压
     */
    private Boolean overVoltage;
    /**
     * 过压恢复
     */
    private Boolean overVoltageRecover;
    /**
     * 欠压
     */
    private Boolean underVoltage;
    /**
     * 欠压恢复
     */
    private Boolean underVoltageRecover;
    /**
     * 紧停
     */
    private Boolean emergency;
    /**
     * 紧停恢复
     */
    private Boolean emergencyRecover;
    /**
     * AC电源断开
     */
    private Boolean acPowerOff;
    /**
     * AC电源恢复
     */
    private Boolean acPowerRecover;

    public static EventInfo buildDefault() {
        return new EventInfo(Boolean.FALSE, Boolean.FALSE,
                Boolean.FALSE, Boolean.FALSE,
                Boolean.FALSE, Boolean.FALSE,
                Boolean.FALSE, Boolean.FALSE,
                Boolean.FALSE, Boolean.FALSE);
    }

}
